
#include "builder.hpp"

#include <cassert>
#include <iostream>

int main()
{
	namespace D = DesignPatterns;
	D::builder * pizza_arm = new D::armenian_pizza;	
	//(void)pizza_arm;
	D::builder * pizza_itl = new D::italian_pizza;	
	//(void)pizza_itl;

	/// Create and cooked armenian pizza 
	std::cout << "\n Create and cooked armenian pizza \n" << std::endl;
	D::cook * c = new D::cook;
	c->set_pizza_product(pizza_arm);
	c->create_pizza_product();

	/// Create and cooked italian pizza 
	std::cout << "\n Create and cooked italian pizza \n" << std::endl;
	c->set_pizza_product(pizza_itl);
	c->create_pizza_product();

	/// Get cooked product from DesignPatterns::cook 
	D::pizza * p_a = c->get_pizza_product();
	std::cout <<"\n\n\n Get cooked product from DesignPatterns::cook \n" 
								<< std::endl;
	std::cout << p_a->m_sauce << std::endl;
	std::cout << p_a->m_topping << std::endl;
	std::cout << p_a->m_dough << std::endl;
        return 0;
}
